package com.guigu.userservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
public class Permission {
    @TableId(value = "permission_id", type = IdType.AUTO)
    private Long permissionId;
    @TableField(value = "permission_name")
    private String permissionName;
    @TableField(value = "permission_code")
    private String permissionCode;
    @TableField(value = "request_path")
    private String requestPath;
    @TableField(value = "request_method")
    private String requestMethod;
    @TableField(value = "parent_id")
    private Long parentId;
    @TableField(value = "permission_type")
    private Integer permissionType;
    @TableField(value = "sort")
    private Integer sort;
    @TableField(value = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @TableField(value = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
